package lab02.test04;

import java.util.Scanner;

public class Staff {

    Scanner sc = new Scanner(System.in);
    //它的属性包括：员工姓名、员工号码、员工基本薪水、员工薪水增长额；
    private String name;
    private String phonenum;
    private float basesalary;
    private float salarygrowth;

    // 它的方法包括：构造方法、获取员工姓名、获取员工号码、获取员工基本薪水、计算薪水增长额及计算增长后的工资总额。
    Staff(String name, String phonenum, float basesalary, float salarygrowth) {
        this.name = name;
        this.phonenum = phonenum;
        this.basesalary = basesalary;
        this.salarygrowth = salarygrowth;
    }

    String getName() {

        return name;
    }

    String getPhonenum() {

        return phonenum;
    }

    float getBasesalary() {

        return basesalary;
    }

    float getSalarygrowth() {
        return salarygrowth;
    }
    float salary(){
        return basesalary + basesalary * salarygrowth;
    }
}
